# your_app/templatetags/custom_filters.py

# 自定义过滤器注册
from django import template
register = template.Library()

@register.filter
def get_item(dictionary, key):
    return dictionary.get(key)